<template>
  <div>
    <BaseButton :config="config" @click="addNew"/>
  </div>
</template>
<script>
import BaseButton from '@comp/hhd/design/FormMenu/button/base/BaseButton.vue';
import {createProps} from '@/utils';

export default {
  name: 'AddNew',
  components: {
    BaseButton
  },
  props: {
    config: createProps(Object, () => ({}))
  },
  methods: {
    addNew() {
      this.$emit('addNew', {viewId: this.config.config.viewId, actionId: this.config.config.actionId});
    },
  }
};
</script>